<template>
	<view class="flex-col page">
		<view class="flex-col group_4">
			<view class="flex-col">
				<view class="justify-between section_1">
					<text class="text_1">发票类型</text>
					<text class="text_2">电子发票</text>
				</view>
				<view class="flex-col items-start text-wrapper"><text class="text_3">发票信息</text></view>
				<view class="justify-between group_66 group_11">
					<text class="text_44">抬头类型</text>
					<text class="text_55">{{bill.openType==0?'个人':'企业'}}</text>
				</view>
				<view class="justify-between group_66 group_11">
					<image
						src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/617a2ca7e4f1450011362b37/62b127f6d029820011531bae/16557837641414645292.png"
						class="image_5" />
					<text class="text_44">发票抬头</text>
					<text class="text_55">{{bill.rise}}</text>
				</view>
				<view class="justify-between group_66 group_11" v-if="bill.openType==1">
					<image
						src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/617a2ca7e4f1450011362b37/62b127f6d029820011531bae/16557837641414645292.png"
						class="image_5" />
					<text class="text_44">公司税号</text>
					<text class="text_55">{{bill.dutyParagraph}}</text>
				</view>
				<view class="justify-between group_66 group_11 u-m-t-10 u-m-b-10" v-if="bill.content">
					<text class="text_44">发票内容</text>
					<text class="text_55">{{bill.content}}</text>
				</view>
				<view class="justify-between group_66 group_11">
					<image
						src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/617a2ca7e4f1450011362b37/62b127f6d029820011531bae/16557837641414645292.png"
						class="image_5" />
					<text class="text_44">联系方式</text>
					<text class="text_55">{{bill.phone.substr(0,3)+'****'+bill.phone.substr(7,10)}}</text>
				</view>
				<view class="justify-between group_66 group_11" v-if="bill.email">
					<text class="text_44">电子邮箱</text>
					<text class="text_55">{{bill.email}}</text>
				</view>
			</view>
			<view class="flex-col items-center button" @click="confirm"><text class="text_18">确认提交</text></view>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(option) {
			if (option.hasOwnProperty('orderid')) {
				this.bill = uni.getStorageSync('bill')
				this.orderid = option.orderid;
			}
		},
		components: {},
		data() {
			return {
				bill: {},
				orderid: ''
			};
		},
		methods: {
			confirm() {
				this.$http('bill.invoicing', this.bill).then(r => {
					if (r.code == 200) { //此处接口有改动
						this.go('/pages/my/bill/bill?orderid=' + this.orderid);
					}
				});
			}

		},
	};
</script>

<style scoped lang="scss">
	.group_11 {
		padding: 14.5px 0 14.5px;
		border-bottom: solid 0.5px #eeeeee;
	}

	.image_5 {
		position: absolute;
		margin-top: 3px;
		margin-left: 33rpx;
		flex-shrink: 0;
		width: 6px;
		height: 6px;
	}

	.group_12 {
		margin-bottom: 3.5px;
	}

	.text_10 {
		margin-top: 3.5px;
		color: #333333;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		line-height: 19px;
	}

	.text_8 {
		margin-left: 4px;
		color: #202020;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
	}

	.page {
		background-color: #f6f7f9;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100vh;
	}

	.group_4 {
		padding-bottom: 20px;
		flex: 1 1 auto;
		overflow-y: auto;
	}

	.button {
		margin: 101px 16px 0;
		height: 88rpx;
		background-color: #1d6aff;
		border-radius: 22px;
	}

	.section_1 {
		padding: 15px 16px 21px 26px;
		background-color: #ffffffff;
	}

	.text-wrapper {
		font-weight: 600;
		padding: 26rpx 0 26rpx;
		background-color: #E9EFFF;
	}

	.section_2 {
		padding: 0 15px 21px 16px;
		background-color: #ffffffff;
	}

	.section_3 {
		margin-top: 10px;
		padding-left: 16px;
		padding-right: 15px;
		background-color: #ffffffff;
	}

	.group_66 {
		display: flex;
		align-items: center;
		height: 110rpx;
		background-color: #ffffff;
	}

	.text_44 {
		margin-left: 50rpx;
		font-weight: 400;
		color: #333333;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
		color: #000;
	}

	.text_55 {
		color: #000000;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		margin-right: 30rpx;
	}

	.text_18 {

		color: #ffffff;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		height: 100%;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.text_1 {
		color: #202020;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		line-height: 19px;
	}

	.text_2 {
		color: #333333;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		line-height: 19px;
	}

	.text_3 {
		margin-left: 26px;
		color: #1d6aff;
		font-size: 14px;
		font-family: '.AppleSystemUIFont';
		line-height: 16.5px;
	}

	.group_6 {
		padding: 14.5px 1.5px 21px 10px;
		border-bottom: solid 0.5px #eeeeee;
	}

	.group_14 {
		padding: 15px 0 18px 10px;
	}

	.text_4 {
		color: #333333;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		line-height: 19px;
	}

	.text_5 {
		color: #333333;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
	}

	.group_8 {
		padding-top: 15px;
	}

	.group_10 {
		margin-top: 20.5px;
		border-top: solid 0.5px #eeeeee;
	}

	.text_16 {
		margin-bottom: 3.5px;
		color: #202020;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		line-height: 19px;
	}

	.text_17 {
		margin-top: 3.5px;
		color: #333333;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		line-height: 19px;
	}

	.text_7 {
		margin-right: 2px;
		color: #333333;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		line-height: 19px;
	}

	.group_13 {
		padding-left: 10px;
		padding-top: 14.5px;
	}

	.text_6 {
		margin-left: 4px;
		color: #202020;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		line-height: 19px;
	}

	.text_12 {
		color: #202020;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		line-height: 19px;
	}

	.text_13 {
		color: #333333;
		font-size: 16px;
		font-family: '.AppleSystemUIFont';
		line-height: 19px;
	}
</style>
